package com.ming_za.odupdaterserver.core.service.res.obj;

import com.ming_za.odupdaterserver.core.sqlite.domain.Res;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(description = "主版本对应的更新列表元素")
@Data
public class MainUpdateItem {

    @Schema(description = "资源id")
    private Long resId;

    @Schema(description = "对应客户端文件的路径")
    private String path;

    @Schema(description = "是否为删除")
    private boolean delete;

    @Schema(description = "标签组，二进制位存储")
    private Long label;

    public MainUpdateItem(Res res) {
        this.resId = res.getResid();
        this.path = res.getClientPath();
        this.delete = res.getDelete();
        this.label = res.getLabel();
    }
}
